package com.appspot.peachykene;

import java.util.Locale;
import java.util.ResourceBundle;

public class Rb {

	private static ResourceBundle nlRb;
	private static ResourceBundle enRb;
	
	static {
		enRb = ResourceBundle.getBundle("translations", Locale.ENGLISH);
		nlRb = ResourceBundle.getBundle("translations", new Locale("nl"));
	}
	
	public static String translate(String key, String lang) {
		if("nl".equals(lang)) {
			return nlRb.getString(key);
		} else {
			return enRb.getString(key);
		}
	}
}
